
 export function deepCopy(obj) {//深拷贝
          if(typeof obj !== 'object') return;
          let newObj = obj instanceof Array ? [] : {};
          for(var key in obj) {
               if(obj.hasOwnProperty(key)) {
                    newObj[key] = typeof obj[key] === 'object' ? deepCopy(obj[key]) : obj[key];
                }
            }
            return newObj;
       } 
export function fnNullValue(obj) {//深拷贝+undefined，null，转成''
	         console.log(typeof obj)
			  if(obj===null||obj===undefined||obj==="undefined"){
				  return '';
			  }
          if(typeof obj !== 'object') return obj;
          let newObj = obj instanceof Array ? [] : {};
          for(var key in obj) {
               if(obj.hasOwnProperty(key)) {
                    newObj[key] = typeof obj[key] === 'object' ?obj[key]===null?'': fnNullValue(obj[key]) : 
					(obj[key]==undefined||obj[key]=="undefined"||obj[key]===null)?'':obj[key];
                }
            }
            return newObj;
       }
export function fnNullValue2(obj) {//深拷贝+undefined，null，转成''
          console.log(obj instanceof Object)
      if(!(obj instanceof Object)){
              if(obj===null||obj===undefined||obj==="undefined") obj=''
               return obj;
         }
      let newObj = obj instanceof Array ? [] : {};
      for(var key in obj) {
           if(obj.hasOwnProperty(key)) {
                newObj[key] = obj[key] instanceof Object ? fnNullValue(obj[key]) : 
                     (obj[key]==undefined||obj[key]=="undefined"||obj[key]===null)?'':obj[key];
            }
        }
        return newObj;
   }